package cn.yeziji.forum.controller;

import cn.yeziji.forum.common.ForumResult;
import cn.yeziji.forum.dao.intf.ForumUserDetailDao;
import cn.yeziji.forum.dto.details.ForumUserOperaDetailDTO;
import cn.yeziji.forum.utils.ForumResultUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 用户操作控制器
 *
 * @author gzkemays
 * @since 2022/1/25 21:17
 */
@RestController
@RequestMapping("/userDetail")
public class ForumUserDetailController {
  @Resource ForumUserDetailDao userDetailDao;

  @PostMapping("/update")
  public ForumResult update(@RequestBody ForumUserOperaDetailDTO dto) {
    return ForumResultUtils.ok(userDetailDao.update(dto));
  }
}
